{% extends "single.html" %}

{% block title %}sign in {% endblock %}
{% block navpath %}
{#    <ol class="breadcrumb">#}
{#      <li><a href="#"> 联系地址</a></li>#}
{#      <li class="active">添加联系地址</li>#}
{#    </ol>#}
    <div class="page-header">
      <h1><small>注册</small></h1>
    </div>
{% endblock %}

{% block main %}
    <div class="col-xs-6">
        <form class="form-horizontal" role="form" method="post">
          {% csrf_token %}
          <div class="form-group">
            <label for="username" class="col-sm-2 control-label">{{ form.fields.username.label }}</label>
            <div class="col-sm-10">
              <input type="text" class="form-control" id="username" name="username" placeholder="{{ form.fields.username.help_text }}">
              {% if form.username.errors %}
                {% for error in form.username.errors %}
                  <p class="alert-danger" >{{ error }}</p>
                {% endfor %}
              {% endif %}
            </div>
          </div>
          <div class="form-group">
            <label for="password" class="col-sm-2 control-label">{{ form.fields.password.label }}</label>
            <div class="col-sm-10">
              <input type="password" class="form-control" id="password" name="password" placeholder="{{ form.fields.password.help_text }}">
              {% if form.password.errors %}
                {% for error in form.password.errors %}
                  <p class="alert-danger" >{{ error }}</p>
                {% endfor %}
              {% endif %}
            </div>
          </div>
          <div class="form-group">
            <label for="confirm" class="col-sm-2 control-label">{{ form.fields.confirm.label }}</label>
            <div class="col-sm-10">
              <input type="password" class="form-control" id="confirm" name="confirm" placeholder="{{ form.fields.confirm.help_text }}">
              {% if form.confirm.errors %}
                {% for error in form.confirm.errors %}
                  <p class="alert-danger" >{{ error }}</p>
                {% endfor %}
              {% endif %}
            </div>
          </div>
          <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
              <button type="submit" class="btn btn-default">登录</button>
            </div>
          </div>
        </form>
    </div>
{% endblock %}
